package com.vhall.component.controller.export;

import com.vhall.component.controller.export.facade.ExportSpecialFacade;
import com.vhall.component.entity.interactive.vo.QuestionConsoleExportReqVO;
import com.vhall.component.entity.room.vo.RoomAdminListReqVO;
import com.vhall.component.framework.common.annotation.VhallComponent;
import com.vhall.component.plugin.common.annotation.TokenAuth;
import com.vhall.component.plugin.common.support.Token;
import com.vhall.component.plugin.common.support.TokenThreadLocal;
import com.vhall.component.service.export.ExportService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author xing.wang
 * @date 2022/9/1
 */
@VhallComponent
public class ExportExceptionController implements ExportSpecialFacade {
    @Autowired
    ExportService exportService;

    @Override
    @TokenAuth("sys:room:export")
    public Boolean listExport(RoomAdminListReqVO reqVO) {
        Token token = TokenThreadLocal.getToken();
        return exportService.listExport(token, reqVO);
    }

    @TokenAuth
    @Override
    public Boolean exportQuestionAnswer(QuestionConsoleExportReqVO reqVO) {
        return exportService.exportQuestionAnswer(reqVO);
    }

}
